|
JIRA 4.4 : Surviving Connection Closures
This page last changed on Jun 22, 2011 by ggaskell.
When a database server reboots or a network failure has occurred, all connections in the database connection pool are broken. To overcome this issue, JIRA would normally need restarting (or for JIRA WAR distributions, the application server running JIRA would need restarting). However, the Apache Commons DBCP (DataBase Connection Pool), which is used by JIRA, can validate connections in the connection pool by running a simple SQL query. If a broken connection is detected, a new one is created to replace it. To do this, you need to specify an optional <validation-query/> element (in the dbconfig.xml file of your JIRA Home Directory), whose content is the query which validates connections in the connection pool. See the following procedure for details. Setting the Validation Query for Your JIRA DatabaseTo ensure JIRA validates connections in the connection pool:
Determining the Validation QueryDifferent database types have slightly different SQL syntax requirements for their validation query. The validation query should be as simple as possible, as this is run every time a connection is retrieved from the pool. The following validation queries are recommended for the following types of databases:
ResultYou should now be able to recover from a complete loss of all connections in the database connection pool without the need to restart JIRA or the application server running JIRA.
|
| Document generated by Confluence on Aug 18, 2011 23:28 |